package com.bw.coll;

import com.bw.bean.Emp;
import com.bw.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EmpColl {

    @Autowired
    EmpService emp;

    @RequestMapping("/list1")
    public List getList1(){
        List<Emp> list1 = emp.getList1();
        return list1;
    }

    @RequestMapping("/list2")
    public List getList2(){
        List<Emp> list1 = emp.getList2("%功%");
        return list1;
    }

    @RequestMapping("/list3")
    public List getList3(){
        List<Emp> list3 = emp.getList3("111");
        return list3;
    }

    @RequestMapping("/list4")
    public List getList4(){
        List<Emp> list4 = emp.getList4("2010-03-20", "2020-03-24");
        return list4;
    }

}
